function fragment=cutgroup( img, group, factor);
% fragment=cutgroup( img, group, factor) - extrtacts subimage from img, described
% by group boundaries. group dimensions are multiplied by factor
% AUTOSTOP

fragment = img( floor(group.minY * factor) - factor/2 : ceil( group.maxY * factor ) + factor/2 ...
	, floor( group.minX * factor ) - factor/2 : ceil( group.maxX * factor ) + factor/2 ...
	, : );